package com.zzgele.qmzb.api.dao;

import com.zzgele.qmzb.api.core.Mapper;
import com.zzgele.qmzb.api.model.VideoList;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Repository
public interface VideoListMapper extends Mapper<VideoList> {

    List<HashMap> recomendList(Map<String, Object> map);

    @Update("update video_list set del_flag=1 where id =#{id}")
    int deleteVideo(Map<String, Object> map);

    List<HashMap> myList(Map<String, Object> map);

     @Update("update video_list set praise_count=praise_count+1 where id =#{vid}")
    int updateLike(Map<String, Object> map);

    @Update("update video_list set praise_count=praise_count-1 where id =#{vid}")
    int updateDislike(Map<String, Object> map);

    List<HashMap> recommandList(Map<String, Object> map);

}